package com.kongyz.filter;

import com.kongyz.Person;

import java.util.ArrayList;
import java.util.List;

/**
 * @author kongyz
 * @date 2018/6/27 21:57
 * @Description: 单身的
 */
public class CriteriaSingle implements Criteria {
    public List<Person> meetCriteria(List<Person> personList) {
        List<Person> singlePersons=new ArrayList<Person>();
        for (Person person:personList){
            if(person.getMeritalStatus().equalsIgnoreCase("单身")){
                singlePersons.add(person);
            }
        }
        return singlePersons;
    }
}
